﻿using System;
using System.Collections.ObjectModel;
using System.Net.Http;
using System.Web.Http.Controllers;

namespace Ttifa.WebApiBase.Filters
{
    /// <summary>
    /// 接口支持GET,POST请求标记
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class HttpGetPostAttribute : Attribute, IActionHttpMethodProvider
    {
        /// <summary>
        /// 接口访问支持类型集合
        /// </summary>
        public Collection<HttpMethod> HttpMethods { get; } = new Collection<HttpMethod>() { HttpMethod.Get, HttpMethod.Post };
    }
}